home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / PC2Amiga / Samba / docs / textdocs / PRINTER_DRIVER.txt < prev    next >
Text File  |  2000-04-25  |  8KB  |  239 lines

  1. !==
  2. !== PRINTER_DRIVER.txt for Samba release 2.0.7 26 Apr 2000
  3. !==
  4. ==========================================================================
  5.     Supporting the famous PRINTER$ share
  6.  
  7.      Jean-Francois.Micouleau@utc.fr, 10/26/97
  8.     modified by herb@sgi.com 1/2/98
  9.  
  10. ===========================================================================
  11.  
  12. Disclaimer:
  13.  
  14.     This ONLY works with Windows 95
  15.     It does NOT work with Windows NT 4
  16.  
  17.  
  18. Goal:
  19.  
  20.     When you click on a samba shared printer, you can now install the driver
  21.     automatically onto the Windows 95 machine, as you would from an NT server.
  22.     
  23. How To:
  24.  
  25.     It's a three step config.
  26.     
  27.     First, create a new directory, where you will put the driver files, and
  28.     make a share in smb.conf pointing to it.
  29.  
  30.     Example:
  31.     
  32.         [printer$]
  33.              path=/usr/local/samba/printer
  34.              public=yes
  35.              browseable=yes
  36.  
  37.     Second, you have to build the list of drivers required for a specific
  38.     printer. This is the most complicated thing to do. Get the files
  39.     'msprint.inf' and 'msprint2.inf' from Windows 95, the easiest way is to
  40.     grab them from a working Windows 95 computer. They are usually located
  41.     in 'c:\windows\inf'. Look in them for the printer you have. Run the new
  42.     program 'make_printerdef' with the file name and the printer name as
  43.     parameters. If you have drivers for an unsupported or updated printer,
  44.     first install these drivers on an Windows 95 system. There will be a
  45.     file created in your inf directory named 'oem?.inf' (where the ? is some
  46.     number). Use this file instead of msprint.inf.
  47.  
  48.     Example: (from the /usr/local/samba/lib directory)
  49.         
  50.     make_printerdef msprint.inf "Apple LaserWriter" >> printers.def
  51.      
  52.     The program will print out a list of required files to stderr.
  53.     Copy all the files listed into the directory you created in step 1.
  54.     If you have "preserve case = yes" make sure your files names match
  55.     EXACTLY the names listed.
  56.     
  57.     Third, you need to add 2 new parameters in smb.conf. One is in the
  58.     [global] section, called 'printer driver file' pointing to the printer
  59.     description file you just created, and the other in each printer share,
  60.     called 'printer driver location' pointing to where the client will get 
  61.     the drivers. Don't forget to set correctly the printer driver parameter
  62.     to the Windows printer name.
  63.  
  64.     Example:
  65.     
  66.         [global]
  67.             printer driver file=/usr/local/samba/lib/printers.def
  68.  
  69.         [lp]
  70.            comment = My old printer laser
  71.            browseable = yes
  72.            printable = yes
  73.            public = yes
  74.            create mode = 0700
  75.            printer driver=Apple LaserWriter
  76.            printer driver location=\\%h\PRINTER$
  77.  
  78.     %h will expand to the computer name, and PRINTER$ is the name of the
  79.     share created in step one.
  80.     
  81.     
  82. If it doesn't work for you, don't send flame ! It worked for me. In case of
  83. trouble don't hesitate to send me a mail with your smb.conf file and 
  84. printers.def
  85.  
  86.  
  87. *******  added by herb@sgi.com
  88.  
  89. For those of you who like to know the details, and in case I have guessed
  90. wrong on some of the fields - The following is the format of the entries 
  91. in the printers.def file: (entries are 1 single line - they are split here 
  92. for readability)
  93.  
  94. <Long Printer Name>:<Driver File Name>:<Data File Name>:<Help File Name>:
  95. <Language Monitor Name>:<Default Data Type>:<Comma Separated list of Files>
  96.  
  97. The <Help File Name> and the <Language Monitor Name> can be empty.
  98. If no <Driver File Name> or <Data File Name> are specified in the inf file,
  99. these will default to the section name for the printer.
  100.  
  101. The following is an excerpt from the MSPRINT2.INF file on a WIN95 machine.
  102. I have deleted all but the entries relating to installing a driver for the
  103. "QMS ColorScript 100 Model 30" printer. Using this "file" I'll try to 
  104. explain how the printers.def file is created.
  105.  
  106. make_printerdef is run with the first argument being the name of this
  107. file (MSPRINT2.INF in this case) and the second argument being the
  108. name of the printer ("QMS ColorScript 100 Model 30" in this case).
  109.  
  110. The printer name is first found in the "Model section" to obtain the
  111. name of the "Installer Section" (this is the name after the equal sign).
  112. We ignore the alternate name.
  113.  
  114. The "Installer Section" contains entries for "CopyFiles" and "DataSection".
  115. The "CopyFiles" line gives a list of all the required files for this
  116. printer. If the name begins with an @ it is the name of a file (after
  117. you strip off the @), otherwise it is the name of a "Copy Section" which
  118. in turn is a list of files required. This printer has one file listed
  119. "QCS30503.SPD" and two sections "COLOR_QMS_100_30" and "PSCRIPT". The
  120. "COLOR_QMS_100_30" section is listed in the "[DestinationDirs]" as 
  121. having a value of 23. This means that all files listed in this section
  122. should go into the "color" subdirectory. The list of files to copy for
  123. this printer is thus:
  124.  
  125. QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI,
  126. TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL
  127.  
  128. From the "Data Section" we obtain values for "DriverFile", "HelpFile",
  129. and "LanguageMonitor". The % around the value for "LanguageMonitor"
  130. indicates that it is a string that can be localized so its actual value
  131. is obtained from the "[Strings]" section. The "Data Section" could also
  132. have contained an entry for "DefaultDataType".
  133.  
  134. Using the information we have obtained we can now construct the entry
  135. for the printers.def file.
  136.  
  137. <Long Printer Name>     -> QMS ColorScript 100 Model 30  (name given
  138.                 on the command line)
  139. <Driver File Name>      -> PSCRIPT.DRV  (given in Data Section)
  140. <Data File Name>        -> QCS30503.SPD (defaults to Install Section name)
  141. <Help File Name>        -> PSCRIPT.HLP  (given in Data Section)
  142. <Language Monitor Name> -> PostScript Language Monitor  (given in Data Section)
  143. <Default Data Type>     -> RAW (default if not specified)
  144.  
  145.  
  146. So.... the enty (actually one line but split here for readability) would
  147. be:
  148.  
  149. QMS ColorScript 100 Model 30:PSCRIPT.DRV:QCS30503.SPD:
  150. PSCRIPT.HLP:PostScript Language Monitor:RAW:
  151. QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI,
  152. TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL
  153.  
  154. ---------------------- Info from MSPRINT2.INF ------------------------
  155. ;
  156. ; The Manufacturer section lists all of the manufacturers that we will
  157. ; display in the Dialog box
  158.  
  159. [Manufacturer]
  160. "QMS"
  161.  
  162.  
  163. ;
  164. ; Model sections. Each section here corresponds with an entry listed in the
  165. ; [Manufacturer] section, above. The models will be displayed in the order
  166. ; that they appear in the INF file.
  167. ;
  168. ; Each model lists a variation of its own name as a compatible ID. This
  169. ; is done primarily as an optimization during upgrade.
  170. ;
  171. [QMS]
  172. "QMS ColorScript 100 Model 30"    = QCS30503.SPD,QMS_ColorScript_100_Model_30
  173.  
  174.  
  175. ;
  176. ; Installer Sections
  177. ;
  178. ; These sections control file installation, and reference all files that
  179. ; need to be copied. The section name will be assumed to be the driver
  180. ; file, unless there is an explicit DriverFile section listed.
  181. ;
  182. [QCS30503.SPD]
  183. CopyFiles=@QCS30503.SPD,COLOR_QMS_100_30,PSCRIPT
  184. DataSection=PSCRIPT_DATA
  185.  
  186. ; Copy Sections
  187. ;
  188. ; Lists of files that are actually copied. These sections are referenced
  189. ; from the installer sections, above. Only create a section if it contains
  190. ; two or more files (if we only copy a single file, identify it in the
  191. ; installer section, using the @filename notation) or if it's a color
  192. ; profile (since the DestinationDirs can only handle sections, and not
  193. ; individual files).
  194. ;
  195. [COLOR_QMS_100_30]
  196. QMS10030.ICM
  197.  
  198. [PSCRIPT]
  199. PSCRIPT.DRV
  200. PSCRIPT.HLP
  201. PSCRIPT.INI
  202. TESTPS.TXT
  203. APPLE380.SPD
  204. FONTS.MFM
  205. ICONLIB.DLL
  206. PSMON.DLL
  207.  
  208.  
  209. ;
  210. ; Data Sections
  211. ;
  212. ; These sections contain data that is shared between devices.
  213. ;
  214. [PSCRIPT_DATA]
  215. DriverFile=PSCRIPT.DRV
  216. HelpFile=PSCRIPT.HLP
  217. LanguageMonitor=%PS_MONITOR%
  218.  
  219.  
  220. ;
  221. ; Color profiles go to the colors directory. All other files go to the
  222. ; system directory
  223. ;
  224.  
  225. [DestinationDirs]
  226. DefaultDestDir=11
  227. COLOR_QMS_100_30=23
  228. COLOR_TEKTRONIX_200I=23
  229. COLOR_TEKTRONIX_III_PXI=23
  230.  
  231.  
  232. ;
  233. ; Localizable Strings
  234. ;
  235. [Strings]
  236. MS="Microsoft"
  237. PS_MONITOR="PostScript Language Monitor,PSMON.DLL"
  238.  
  239.